# -*- coding:utf-8 -*-
"""
@file: class_demo.py 
@time: 2019/06/30
@author: ljt
"""
from abc import abstractmethod


class Person(object):
	"""
	
	"""
	arm = "arm"
	def __init__(self,name,age):
		self.name = name
		self.age = age


class Mam(object):
	"""
	练习类demo
	一般类都会继承一个对象，
	"""
	# 类变量，可以通过类直接访问的变量，不需要通过对象访问
	local = "chongqing"
	
	def __init__ (self,height,weight,age,skin_color,money):
		self.sex = "woman"
		self.height = height
		self.weight = weight
		self.__age = age   # 私有变量，只能内部访问，
		self.skin_color = skin_color
		self.money = money
	
	def get_age(self):
		return self.__age
	
	def set_money(self, money):
		self.money = money
	
	def get_money (self):
		return self.money
	
	@abstractmethod
	def work (self):
		"""
		
		:return:
		"""
		pass


class Baba(object):
	def __init__ (self,height,weight,skin_color):
		self.sex = "man"
		self.height = height
		self.weight = weight
		self.skin_color = skin_color
	
	def get_my_money (self):
		return 500000000

 

class Nver(Mam,Baba):
	
	def __init__ (self, name, age):
		super().__init__()
		self.name = name
		self.age = age
	
	def work (self):
		print("扫地")


if __name__ == '__main__':
	yll = Person("yxl",25)
	ljt = Person("ljt",28)
	print(ljt.arm)
	lmy1 = Nver(name="lmy",age=1)
	print(lmy1.money)
	lmy1.set_money(5000)
	print(lmy1.money)



